package com.boot.stomp.authentication;

import org.springframework.messaging.simp.stomp.StompHeaderAccessor;

import java.security.Principal;

/**
 * @author 霜寒 <1621856595@qq.com>
 * @date 2021/2/6 18:58
 **/

public interface StompAuthenticationHandler {

    Principal getPrincipal(StompHeaderAccessor accessor);

    default boolean authentication(Principal principal) {
        return true;
    }

}
